package cn.mill.core;

import cn.mill.common.data.DataCommon;
import cn.mill.common.data.ItemArray;

public class DefaultData implements DataCommon<ItemArray> {
	
	private static final long serialVersionUID = -7149316586028085373L;
	private ItemArray items;
	
	private Throwable exception;
	
	private boolean isfine;
	
	private String message;
	
	private String code;
	
	@Override
	public ItemArray getValue() {
		return this.items;
	}
	
	public void setValue(ItemArray items) {
		this.items = items;
	}
	
	@Override
	public Throwable getException() {
		return exception;
	}
	
	public void setException(Exception exception) {
		this.exception = exception;
	}
	
	@Override
	public boolean hasException() {
		return exception == null ? true : false;
	}
	
	@Override
	public boolean isFine() {
		return this.isfine;
	}
	
	public void setFine(boolean fine) {
		this.isfine = fine;
	}
	
	@Override
	public String getMessage() {
		return this.message;
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
	@Override
	public String getCode() {
		return this.code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
}
